import Dao.Student;
import xml改纯注解.config.SpringConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx=new AnnotationConfigApplicationContext(SpringConfig.class);
        Student student1 = ctx.getBean("student", Student.class);
        Student student2 = ctx.getBean("student", Student.class);
        System.out.println(student1);
        System.out.println(student2);
        ctx.close();
    }
}
